package com.ych.modules.base.dbEntity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Transient;

import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * Author: Usopp.tsui
 * Date: 2020/12/5
 * Time: 15:08
 * Description:
 */
@Data
@TableName("t_user_info")
@ApiModel(value = "TUserInfoEntity", description = "数据库-用户表")
public class TUserInfoEntity extends AbstractPageEntity {
    @TableId("user_id")
    @ApiModelProperty(value = "用户主键", dataType = "String", notes = "用户主键")
    private String userId;

    @TableField("user_name")
    @ApiModelProperty(value = "用户名", dataType = "String", notes = "用户名")
    private String userName;

    @TableField("mobile")
    @ApiModelProperty(value = "电话号码", dataType = "String", notes = "电话号码")
    private String mobile;

    @TableField("pay_password")
    @ApiModelProperty(value = "支付密码", dataType = "String", notes = "支付密码")
    private String payPassword;

    @TableField("password")
    @ApiModelProperty(value = "用户密码", dataType = "String", notes = "用户密码")
    private String password;

    @TableField("salt")
    @ApiModelProperty(value = "盐", dataType = "String", notes = "盐")
    private String salt;

    @TableField("user_head_url")
    @ApiModelProperty(value = "用户头像地址", dataType = "String", notes = "用户头像地址")
    private String userHeadUrl;

    @TableField("vip")
    @ApiModelProperty(value = "vip等级", dataType = "Integer", notes = "vip等级")
    private Integer vip;

    @TableField("recommender_user_id")
    @ApiModelProperty(value = "推荐人id", dataType = "String", notes = "推荐人id")
    private String recommenderUserId;

    @TableField("pids")
    @ApiModelProperty(value = "父ids，从左往右，推到1千层", dataType = "String", notes = "父ids，从左往右，推到1千层")
    private String pids;

    @TableField("total_subordinate")
    @ApiModelProperty(value = "旗下用户数量", dataType = "Integer", notes = "旗下用户数量")
    private Integer totalSubordinate;

    @TableField("max_subordinate")
    @ApiModelProperty(value = "下线最大支用户数量", dataType = "Integer", notes = "下线最大支用户数量")
    private Integer maxSubordinate;

    @TableField("max_subordinate_user_id")
    @ApiModelProperty(value = "下线最大支用户数量用户id", dataType = "String", notes = "下线最大支用户数量用户id")
    private String maxSubordinateUserId;

    @TableField("second_subordinate")
    @ApiModelProperty(value = "第二大支用户数量", dataType = "Integer", notes = "第二大支用户数量")
    private Integer secondSubordinate;

    @TableField("second_subordinate_user_id")
    @ApiModelProperty(value = "第二大支用户数量用户id", dataType = "String", notes = "第二大支用户数量用户id")
    private String secondSubordinateUserId;

    @TableField("invitation")
    @ApiModelProperty(value = "邀请码", dataType = "String", notes = "邀请码")
    private String invitation;

    @TableField("remarks")
    @ApiModelProperty(value = "备注信息", dataType = "String", notes = "备注信息")
    private String remarks;

    @TableField("province_code")
    @ApiModelProperty(value = "所属省编码", dataType = "String", notes = "所属省编码")
    private String provinceCode;

    @TableField("city_code")
    @ApiModelProperty(value = "所属市编码", dataType = "String", notes = "所属市编码")
    private String cityCode;

    @TableField("county_code")
    @ApiModelProperty(value = "所属县编码", dataType = "String", notes = "所属县编码")
    private String countyCode;

    @TableField("mobile_mode")
    @ApiModelProperty(value = "手机型号", dataType = "String", notes = "手机型号")
    private String mobileMode;

    @TableField("is_collection")
    @ApiModelProperty(value = "是否已经采集用户地址+手机信息 0 已采集 1 未采集", dataType = "String", notes = "是否已经采集用户地址+手机信息 0 已采集 1 未采集")
    private String isCollection;

    @TableField("last_login_time")
    @ApiModelProperty(value = "最近一次登录时间", dataType = "Date", notes = "最近一次登录时间")
    private Date lastLoginTime;

    @TableField("create_user_id")
    @ApiModelProperty(value = "创建用户id", dataType = "String", notes = "创建用户id")
    private String createUserId;

    @TableField("status")
    @ApiModelProperty(value = "用户状态 0：正常 1：禁用", dataType = "String", notes = "用户状态 0：正常 1：禁用")
    private String status;

    @TableField("create_time")
    @ApiModelProperty(value = "注册时间", dataType = "String", notes = "注册时间")
    private Date createTime;

    @TableField("is_ticket")
    @ApiModelProperty(value = "是否已经处理了上级奖券分发 0：已处理 1：未处理", dataType = "String", notes = "是否已经处理了上级奖券分发 0：已处理 1：未处理")
    private String isTicket;

    /**
     * 角色ID列表
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "角色ID列表", dataType = "List<String>", notes = "角色ID列表")
    private List<String> roleIdList;

    /**
     * 用户权限标签
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "用户权限标签", dataType = "Set<String>", notes = "用户权限标签")
    private Set<String> permSet;
    /**
     * 邀请人邀请码
     */
    @TableField(exist = false)
    @Transient
    @ApiModelProperty(value = "邀请人邀请码", dataType = "String", notes = "邀请人邀请码")
    private String      recommenderInvitation;

    @TableField(exist = false)
    @ApiModelProperty(value = "用户账户信息", dataType = "TUserAccountEntity", notes = "用户账户信息")
    private TUserAccountEntity accountEntity;

    @TableField(exist = false)
    @ApiModelProperty(value = "直推用户数量", dataType = "Integer", notes = "直推用户数量")
    private Integer directCount;

    @TableField(exist = false)
    @ApiModelProperty(value = "推荐人信息", dataType = "TUserInfoEntity", notes = "推荐人信息")
    private TUserInfoEntity inviterEntity;
}

